{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "message_json = open('message.json').read()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "imagepath_json = '''\n",
    "{\n",
    "  \"CHARACTER/Ganyu\": \"cardface/Char_Avatar_Ganyu.png\",\n",
    "  \"AVATAR/Ganyu\": \"avatar/Ganyu.png\",\n",
    "  \"CHARACTER/Diona\": \"cardface/Char_Avatar_Diona.png\",\n",
    "  \"AVATAR/Diona\": \"avatar/Diona.png\",\n",
    "  \"CHARACTER/Kaeya\": \"cardface/Char_Avatar_Kaeya.png\",\n",
    "  \"AVATAR/Kaeya\": \"avatar/Kaeya.png\",\n",
    "  \"CHARACTER/Chongyun\": \"cardface/Char_Avatar_Chongyun.png\",\n",
    "  \"AVATAR/Chongyun\": \"avatar/Chongyun.png\",\n",
    "  \"CHARACTER/Kamisato Ayaka\": \"cardface/Char_Avatar_Ayaka.png\",\n",
    "  \"AVATAR/Kamisato Ayaka\": \"avatar/Ayaka.png\",\n",
    "  \"CHARACTER/Eula\": \"cardface/Char_Avatar_Eula.png\",\n",
    "  \"AVATAR/Eula\": \"avatar/Eula.png\",\n",
    "  \"CHARACTER/Shenhe\": \"cardface/Char_Avatar_Shenhe.png\",\n",
    "  \"AVATAR/Shenhe\": \"avatar/Shenhe.png\",\n",
    "  \"CHARACTER/Qiqi\": \"cardface/Char_Avatar_Qiqi.png\",\n",
    "  \"AVATAR/Qiqi\": \"avatar/Qiqi.png\",\n",
    "  \"CHARACTER/Barbara\": \"cardface/Char_Avatar_Barbara.png\",\n",
    "  \"AVATAR/Barbara\": \"avatar/Barbara.png\",\n",
    "  \"CHARACTER/Xingqiu\": \"cardface/Char_Avatar_Xingqiu.png\",\n",
    "  \"AVATAR/Xingqiu\": \"avatar/Xingqiu.png\",\n",
    "  \"CHARACTER/Mona\": \"cardface/Char_Avatar_Mona.png\",\n",
    "  \"AVATAR/Mona\": \"avatar/Mona.png\",\n",
    "  \"CHARACTER/Tartaglia\": \"cardface/Char_Avatar_Tartaglia.png\",\n",
    "  \"AVATAR/Tartaglia\": \"avatar/Tartaglia.png\",\n",
    "  \"CHARACTER/Sangonomiya Kokomi\": \"cardface/Char_Avatar_Kokomi.png\",\n",
    "  \"AVATAR/Sangonomiya Kokomi\": \"avatar/Kokomi.png\",\n",
    "  \"CHARACTER/Kamisato Ayato\": \"cardface/Char_Avatar_Ayato.png\",\n",
    "  \"AVATAR/Kamisato Ayato\": \"avatar/Ayato.png\",\n",
    "  \"CHARACTER/Candace\": \"cardface/Char_Avatar_Candace.png\",\n",
    "  \"AVATAR/Candace\": \"avatar/Candace.png\",\n",
    "  \"CHARACTER/Diluc\": \"cardface/Char_Avatar_Diluc.png\",\n",
    "  \"AVATAR/Diluc\": \"avatar/Diluc.png\",\n",
    "  \"CHARACTER/Xiangling\": \"cardface/Char_Avatar_Xiangling.png\",\n",
    "  \"AVATAR/Xiangling\": \"avatar/Xiangling.png\",\n",
    "  \"CHARACTER/Bennett\": \"cardface/Char_Avatar_Bennett.png\",\n",
    "  \"AVATAR/Bennett\": \"avatar/Bennett.png\",\n",
    "  \"CHARACTER/Amber\": \"cardface/Char_Avatar_Ambor.png\",\n",
    "  \"AVATAR/Amber\": \"avatar/Ambor.png\",\n",
    "  \"CHARACTER/Yoimiya\": \"cardface/Char_Avatar_Yoimiya.png\",\n",
    "  \"AVATAR/Yoimiya\": \"avatar/Yoimiya.png\",\n",
    "  \"CHARACTER/Klee\": \"cardface/Char_Avatar_Klee.png\",\n",
    "  \"AVATAR/Klee\": \"avatar/Klee.png\",\n",
    "  \"CHARACTER/Hu Tao\": \"cardface/Char_Avatar_Hutao.png\",\n",
    "  \"AVATAR/Hu Tao\": \"avatar/Hutao.png\",\n",
    "  \"CHARACTER/Yanfei\": \"cardface/Char_Avatar_Feiyan.png\",\n",
    "  \"AVATAR/Yanfei\": \"avatar/Feiyan.png\",\n",
    "  \"CHARACTER/Dehya\": \"cardface/Char_Avatar_Dehya.png\",\n",
    "  \"AVATAR/Dehya\": \"avatar/Dehya.png\",\n",
    "  \"CHARACTER/Fischl\": \"cardface/Char_Avatar_Fischl.png\",\n",
    "  \"AVATAR/Fischl\": \"avatar/Fischl.png\",\n",
    "  \"CHARACTER/Razor\": \"cardface/Char_Avatar_Razor.png\",\n",
    "  \"AVATAR/Razor\": \"avatar/Razor.png\",\n",
    "  \"CHARACTER/Keqing\": \"cardface/Char_Avatar_Keqing.png\",\n",
    "  \"AVATAR/Keqing\": \"avatar/Keqing.png\",\n",
    "  \"CHARACTER/Cyno\": \"cardface/Char_Avatar_Cyno.png\",\n",
    "  \"AVATAR/Cyno\": \"avatar/Cyno.png\",\n",
    "  \"CHARACTER/Beidou\": \"cardface/Char_Avatar_Beidou.png\",\n",
    "  \"AVATAR/Beidou\": \"avatar/Beidou.png\",\n",
    "  \"CHARACTER/Kujou Sara\": \"cardface/Char_Avatar_Sara.png\",\n",
    "  \"AVATAR/Kujou Sara\": \"avatar/Sara.png\",\n",
    "  \"CHARACTER/Raiden Shogun\": \"cardface/Char_Avatar_Shougun.png\",\n",
    "  \"AVATAR/Raiden Shogun\": \"avatar/Shougun.png\",\n",
    "  \"CHARACTER/Yae Miko\": \"cardface/Char_Avatar_Yae.png\",\n",
    "  \"AVATAR/Yae Miko\": \"avatar/Yae.png\",\n",
    "  \"CHARACTER/Lisa\": \"cardface/Char_Avatar_Lisa.png\",\n",
    "  \"AVATAR/Lisa\": \"avatar/Lisa.png\",\n",
    "  \"CHARACTER/Sucrose\": \"cardface/Char_Avatar_Sucrose.png\",\n",
    "  \"AVATAR/Sucrose\": \"avatar/Sucrose.png\",\n",
    "  \"CHARACTER/Jean\": \"cardface/Char_Avatar_Qin.png\",\n",
    "  \"AVATAR/Jean\": \"avatar/Qin.png\",\n",
    "  \"CHARACTER/Venti\": \"cardface/Char_Avatar_Venti.png\",\n",
    "  \"AVATAR/Venti\": \"avatar/Venti.png\",\n",
    "  \"CHARACTER/Xiao\": \"cardface/Char_Avatar_Xiao.png\",\n",
    "  \"AVATAR/Xiao\": \"avatar/Xiao.png\",\n",
    "  \"CHARACTER/Kaedehara Kazuha\": \"cardface/Char_Avatar_Kazuha.png\",\n",
    "  \"AVATAR/Kaedehara Kazuha\": \"avatar/Kazuha.png\",\n",
    "  \"CHARACTER/Wanderer\": \"cardface/Char_Avatar_Wanderer.png\",\n",
    "  \"AVATAR/Wanderer\": \"avatar/Wanderer.png\",\n",
    "  \"CHARACTER/Ningguang\": \"cardface/Char_Avatar_Ningguang.png\",\n",
    "  \"AVATAR/Ningguang\": \"avatar/Ningguang.png\",\n",
    "  \"CHARACTER/Noelle\": \"cardface/Char_Avatar_Noel.png\",\n",
    "  \"AVATAR/Noelle\": \"avatar/Noel.png\",\n",
    "  \"CHARACTER/Zhongli\": \"cardface/Char_Avatar_Zhongli.png\",\n",
    "  \"AVATAR/Zhongli\": \"avatar/Zhongli.png\",\n",
    "  \"CHARACTER/Albedo\": \"cardface/Char_Avatar_Albedo.png\",\n",
    "  \"AVATAR/Albedo\": \"avatar/Albedo.png\",\n",
    "  \"CHARACTER/Arataki Itto\": \"cardface/Char_Avatar_Itto.png\",\n",
    "  \"AVATAR/Arataki Itto\": \"avatar/Itto.png\",\n",
    "  \"CHARACTER/Collei\": \"cardface/Char_Avatar_Collei.png\",\n",
    "  \"AVATAR/Collei\": \"avatar/Collei.png\",\n",
    "  \"CHARACTER/Tighnari\": \"cardface/Char_Avatar_Tighnari.png\",\n",
    "  \"AVATAR/Tighnari\": \"avatar/Tighnari.png\",\n",
    "  \"CHARACTER/Nahida\": \"cardface/Char_Avatar_Nahida.png\",\n",
    "  \"AVATAR/Nahida\": \"avatar/Nahida.png\",\n",
    "  \"CHARACTER/Yaoyao\": \"cardface/Char_Avatar_Yaoyao.png\",\n",
    "  \"AVATAR/Yaoyao\": \"avatar/Yaoyao.png\",\n",
    "  \"CHARACTER/Fatui Cryo Cicin Mage\": \"cardface/Char_Monster_FatuusMageice.png\",\n",
    "  \"AVATAR/Fatui Cryo Cicin Mage\": \"avatar/FatuusMageice.png\",\n",
    "  \"CHARACTER/Rhodeia of Loch\": \"cardface/Char_Monster_Oceanid.png\",\n",
    "  \"AVATAR/Rhodeia of Loch\": \"avatar/Oceanid.png\",\n",
    "  \"CHARACTER/Mirror Maiden\": \"cardface/Char_Monster_Maidenwater.png\",\n",
    "  \"AVATAR/Mirror Maiden\": \"avatar/Maidenwater.png\",\n",
    "  \"CHARACTER/Fatui Pyro Agent\": \"cardface/Char_Monster_Fatuus.png\",\n",
    "  \"AVATAR/Fatui Pyro Agent\": \"avatar/Fatuus.png\",\n",
    "  \"CHARACTER/Abyss Lector: Fathomless Flames\": \"cardface/Char_Monster_DeaconFire.png\",\n",
    "  \"AVATAR/Abyss Lector: Fathomless Flames\": \"avatar/DeaconFire.png\",\n",
    "  \"CHARACTER/Electro Hypostasis\": \"cardface/Char_Monster_Effigyelectric.png\",\n",
    "  \"AVATAR/Electro Hypostasis\": \"avatar/Effigyelectric.png\",\n",
    "  \"CHARACTER/Maguu Kenki\": \"cardface/Char_Monster_Ningyo.png\",\n",
    "  \"AVATAR/Maguu Kenki\": \"avatar/Ningyo.png\",\n",
    "  \"CHARACTER/Stonehide Lawachurl\": \"cardface/Char_Monster_Bruterock.png\",\n",
    "  \"AVATAR/Stonehide Lawachurl\": \"avatar/Bruterock.png\",\n",
    "  \"CHARACTER/Jadeplume Terrorshroom\": \"cardface/Char_Monster_Fungusgrass.png\",\n",
    "  \"AVATAR/Jadeplume Terrorshroom\": \"avatar/Fungusgrass.png\",\n",
    "  \"CHARACTER/CryoMob\": \"cardface/custom/Cryo Mob.png\",\n",
    "  \"AVATAR/CryoMob\": \"avatar/custom/Cryo Mob.png\",\n",
    "  \"CHARACTER/HydroMob\": \"cardface/custom/Hydro Mob.png\",\n",
    "  \"AVATAR/HydroMob\": \"avatar/custom/Hydro Mob.png\",\n",
    "  \"CHARACTER/PyroMob\": \"cardface/custom/Pyro Mob.png\",\n",
    "  \"AVATAR/PyroMob\": \"avatar/custom/Pyro Mob.png\",\n",
    "  \"CHARACTER/ElectroMob\": \"cardface/custom/Electro Mob.png\",\n",
    "  \"AVATAR/ElectroMob\": \"avatar/custom/Electro Mob.png\",\n",
    "  \"CHARACTER/AnemoMob\": \"cardface/custom/Anemo Mob.png\",\n",
    "  \"AVATAR/AnemoMob\": \"avatar/custom/Anemo Mob.png\",\n",
    "  \"CHARACTER/GeoMob\": \"cardface/custom/Geo Mob.png\",\n",
    "  \"AVATAR/GeoMob\": \"avatar/custom/Geo Mob.png\",\n",
    "  \"CHARACTER/DendroMob\": \"cardface/custom/Dendro Mob.png\",\n",
    "  \"AVATAR/DendroMob\": \"avatar/custom/Dendro Mob.png\",\n",
    "  \"CHARACTER/PhysicalMob\": \"cardface/custom/Physical Mob.png\",\n",
    "  \"AVATAR/PhysicalMob\": \"avatar/custom/Physical Mob.png\",\n",
    "  \"CHARACTER/CryoMobMage\": \"cardface/custom/Cryo Mob Mage.png\",\n",
    "  \"AVATAR/CryoMobMage\": \"avatar/custom/Cryo Mob Mage.png\",\n",
    "  \"CHARACTER/HydroMobMage\": \"cardface/custom/Hydro Mob Mage.png\",\n",
    "  \"AVATAR/HydroMobMage\": \"avatar/custom/Hydro Mob Mage.png\",\n",
    "  \"CHARACTER/PyroMobMage\": \"cardface/custom/Pyro Mob Mage.png\",\n",
    "  \"AVATAR/PyroMobMage\": \"avatar/custom/Pyro Mob Mage.png\",\n",
    "  \"CHARACTER/ElectroMobMage\": \"cardface/custom/Electro Mob Mage.png\",\n",
    "  \"AVATAR/ElectroMobMage\": \"avatar/custom/Electro Mob Mage.png\",\n",
    "  \"CHARACTER/AnemoMobMage\": \"cardface/custom/Anemo Mob Mage.png\",\n",
    "  \"AVATAR/AnemoMobMage\": \"avatar/custom/Anemo Mob Mage.png\",\n",
    "  \"CHARACTER/GeoMobMage\": \"cardface/custom/Geo Mob Mage.png\",\n",
    "  \"AVATAR/GeoMobMage\": \"avatar/custom/Geo Mob Mage.png\",\n",
    "  \"CHARACTER/DendroMobMage\": \"cardface/custom/Dendro Mob Mage.png\",\n",
    "  \"AVATAR/DendroMobMage\": \"avatar/custom/Dendro Mob Mage.png\",\n",
    "  \"CHARACTER_STATUS/Stealth\": \"\",\n",
    "  \"CHARACTER_STATUS/Explosive Spark\": \"\",\n",
    "  \"CHARACTER_STATUS/Niwabi Enshou\": \"\",\n",
    "  \"CHARACTER_STATUS/Scarlet Seal\": \"\",\n",
    "  \"CHARACTER_STATUS/Paramita Papilio\": \"\",\n",
    "  \"CHARACTER_STATUS/Blood Blossom\": \"\",\n",
    "  \"CHARACTER_STATUS/Pyro Elemental Infusion\": \"\",\n",
    "  \"CHARACTER_STATUS/Fiery Rebirth\": \"\",\n",
    "  \"CHARACTER_STATUS/Aegis of Abyssal Flame\": \"\",\n",
    "  \"CHARACTER_STATUS/Incineration Drive\": \"\",\n",
    "  \"CHARACTER_STATUS/Vijnana Suffusion\": \"\",\n",
    "  \"CHARACTER_STATUS/Superlative Superstrength\": \"\",\n",
    "  \"CHARACTER_STATUS/Stonehide\": \"\",\n",
    "  \"CHARACTER_STATUS/Electro Elemental Infusion\": \"\",\n",
    "  \"CHARACTER_STATUS/Rock-Paper-Scissors Combo: Scissors\": \"\",\n",
    "  \"CHARACTER_STATUS/Rock-Paper-Scissors Combo: Paper\": \"\",\n",
    "  \"CHARACTER_STATUS/Electro Crystal Core\": \"\",\n",
    "  \"CHARACTER_STATUS/The Shrine's Sacred Shade\": \"\",\n",
    "  \"CHARACTER_STATUS/Tidecaller: Surf Embrace\": \"\",\n",
    "  \"CHARACTER_STATUS/Crowfeather Cover\": \"\",\n",
    "  \"CHARACTER_STATUS/Conductive\": \"\",\n",
    "  \"CHARACTER_STATUS/Midare Ranzan: New\": \"\",\n",
    "  \"CHARACTER_STATUS/Midare Ranzan\": \"\",\n",
    "  \"CHARACTER_STATUS/Midare Ranzan: Pyro\": \"\",\n",
    "  \"CHARACTER_STATUS/Midare Ranzan: Hydro\": \"\",\n",
    "  \"CHARACTER_STATUS/Midare Ranzan: Cryo\": \"\",\n",
    "  \"CHARACTER_STATUS/Midare Ranzan: Electro\": \"\",\n",
    "  \"CHARACTER_STATUS/Windfavored\": \"\",\n",
    "  \"CHARACTER_STATUS/Heron Shield\": \"\",\n",
    "  \"CHARACTER_STATUS/Refraction\": \"\",\n",
    "  \"CHARACTER_STATUS/Takimeguri Kanka\": \"\",\n",
    "  \"CHARACTER_STATUS/Grimheart\": \"\",\n",
    "  \"CHARACTER_STATUS/Cryo Elemental Infusion\": \"\",\n",
    "  \"CHARACTER_STATUS/Frozen\": \"\",\n",
    "  \"CHARACTER_STATUS/Satiated\": \"\",\n",
    "  \"CHARACTER_STATUS/Jueyun Guoba\": \"\",\n",
    "  \"CHARACTER_STATUS/Adeptus' Temptation\": \"\",\n",
    "  \"CHARACTER_STATUS/Lotus Flower Crisp\": \"\",\n",
    "  \"CHARACTER_STATUS/Northern Smoked Chicken\": \"\",\n",
    "  \"CHARACTER_STATUS/Mushroom Pizza\": \"\",\n",
    "  \"CHARACTER_STATUS/Minty Meat Rolls\": \"\",\n",
    "  \"CHARACTER_STATUS/Sashimi Platter\": \"\",\n",
    "  \"CHARACTER_STATUS/Tandoori Roast Chicken\": \"\",\n",
    "  \"CHARACTER_STATUS/Butter Crab\": \"\",\n",
    "  \"CHARACTER_STATUS/Unmovable Mountain\": \"\",\n",
    "  \"CHARACTER_STATUS/Vermillion Hereafter\": \"\",\n",
    "  \"CHARACTER_STATUS/Lithic Spear\": \"\",\n",
    "  \"CHARACTER_STATUS/King's Squire\": \"\",\n",
    "  \"CHARACTER_STATUS/Moonpiercer\": \"\",\n",
    "  \"CHARACTER_STATUS/Heavy Strike\": \"\",\n",
    "  \"CHARACTER_STATUS/Elemental Resonance: Shattering Ice\": \"\",\n",
    "  \"CHARACTER_STATUS/Elemental Resonance: Fervent Flames\": \"\",\n",
    "  \"TEAM_STATUS/Crystallize\": \"\",\n",
    "  \"TEAM_STATUS/Rain Sword\": \"\",\n",
    "  \"TEAM_STATUS/Floral Sidewinder\": \"\",\n",
    "  \"TEAM_STATUS/Full Plate\": \"\",\n",
    "  \"TEAM_STATUS/Jade Screen\": \"\",\n",
    "  \"TEAM_STATUS/Jade Shield\": \"\",\n",
    "  \"TEAM_STATUS/Stormzone\": \"\",\n",
    "  \"TEAM_STATUS/Winds of Harmony\": \"\",\n",
    "  \"TEAM_STATUS/Poetics of Fuubutsu: Pyro\": \"\",\n",
    "  \"TEAM_STATUS/Poetics of Fuubutsu: Hydro\": \"\",\n",
    "  \"TEAM_STATUS/Poetics of Fuubutsu: Electro\": \"\",\n",
    "  \"TEAM_STATUS/Poetics of Fuubutsu: Cryo\": \"\",\n",
    "  \"TEAM_STATUS/Icy Quill\": \"\",\n",
    "  \"TEAM_STATUS/Chonghua's Frost Field\": \"\",\n",
    "  \"TEAM_STATUS/Ice Lotus\": \"\",\n",
    "  \"TEAM_STATUS/Cat-Claw Shield\": \"\",\n",
    "  \"TEAM_STATUS/Flowing Cicin Shield\": \"\",\n",
    "  \"TEAM_STATUS/Fresh Wind of Freedom\": \"\",\n",
    "  \"TEAM_STATUS/Changing Shifts\": \"\",\n",
    "  \"TEAM_STATUS/I Haven't Lost Yet!\": \"\",\n",
    "  \"TEAM_STATUS/Leave It to Me!\": \"\",\n",
    "  \"TEAM_STATUS/Elemental Resonance: Enduring Rock\": \"\",\n",
    "  \"TEAM_STATUS/Where Is the Unseen Razor?\": \"\",\n",
    "  \"TEAM_STATUS/Elemental Resonance: Sprawling Greenery\": \"\",\n",
    "  \"TEAM_STATUS/Revive on cooldown\": \"\",\n",
    "  \"TEAM_STATUS/Stone and Contracts\": \"\",\n",
    "  \"TEAM_STATUS/Ancient Courtyard\": \"\",\n",
    "  \"TEAM_STATUS/Rhythm of the Great Dream\": \"\",\n",
    "  \"TEAM_STATUS/When the Crane Returned\": \"\",\n",
    "  \"TEAM_STATUS/Wind and Freedom\": \"\",\n",
    "  \"TEAM_STATUS/Pankration!\": \"\",\n",
    "  \"TEAM_STATUS/Rebellious Shield\": \"\",\n",
    "  \"TEAM_STATUS/Millennial Movement: Farewell Song\": \"\",\n",
    "  \"SUMMON/Yuegui: Throwing Mode\": \"cardface/Summon_Yaoyao.png\",\n",
    "  \"SUMMON/Clusterbloom Arrow\": \"cardface/Summon_Tighnari.png\",\n",
    "  \"SUMMON/Cuilein-Anbar\": \"cardface/Summon_Collei.png\",\n",
    "  \"SUMMON/Ushi\": \"cardface/Summon_Itto.png\",\n",
    "  \"SUMMON/Solar Isotoma\": \"cardface/Summon_Albedo.png\",\n",
    "  \"SUMMON/Stone Stele\": \"cardface/Summon_Zhongli.png\",\n",
    "  \"SUMMON/Shadowsword: Lone Gale\": \"cardface/Summon_Jifengcanying.png\",\n",
    "  \"SUMMON/Shadowsword: Galloping Frost\": \"cardface/Summon_Bingshuangcanying.png\",\n",
    "  \"SUMMON/Autumn Whirlwind\": \"cardface/Summon_Kazuha.png\",\n",
    "  \"SUMMON/Stormeye\": \"cardface/Summon_Venti.png\",\n",
    "  \"SUMMON/Chains of Warding Thunder\": \"cardface/Summon_Effigyelectric.png\",\n",
    "  \"SUMMON/Lightning Rose\": \"cardface/Summon_Lisa.png\",\n",
    "  \"SUMMON/Sesshou Sakura\": \"cardface/Summon_Yae.png\",\n",
    "  \"SUMMON/Eye of Stormy Judgment\": \"cardface/Summon_Shougun.png\",\n",
    "  \"SUMMON/Tengu Juurai: Stormcluster\": \"cardface/Summon_SaraB.png\",\n",
    "  \"SUMMON/Tengu Juurai: Ambush\": \"cardface/Summon_SaraA.png\",\n",
    "  \"SUMMON/Oz\": \"cardface/Summon_Crow.png\",\n",
    "  \"SUMMON/Darkfire Furnace\": \"cardface/Summon_DeaconFire.png\",\n",
    "  \"SUMMON/Fiery Sanctum Field\": \"cardface/Summon_Dehya.png\",\n",
    "  \"SUMMON/Baron Bunny\": \"cardface/Summon_Ambor.png\",\n",
    "  \"SUMMON/Oceanic Mimic: Squirrel\": \"cardface/Summon_Ferret.png\",\n",
    "  \"SUMMON/Oceanic Mimic: Frog\": \"cardface/Summon_Frog.png\",\n",
    "  \"SUMMON/Garden of Purity\": \"cardface/Summon_Ayato.png\",\n",
    "  \"SUMMON/Bake-Kurage\": \"cardface/Summon_Kokomi.png\",\n",
    "  \"SUMMON/Reflection\": \"cardface/Summon_Mona.png\",\n",
    "  \"SUMMON/Melody Loop\": \"cardface/Summon_ShiningMiracle.png\",\n",
    "  \"SUMMON/Cryo Cicins\": \"cardface/Summon_MageIce.png\",\n",
    "  \"SUMMON/Herald of Frost\": \"cardface/Summon_Qiqi.png\",\n",
    "  \"SUMMON/Lightfall Sword\": \"cardface/Summon_Eula.png\",\n",
    "  \"SUMMON/Frostflake Seki no To\": \"cardface/Summon_KamisatoRyu.png\",\n",
    "  \"SUMMON/Drunken Mist\": \"cardface/Summon_Diona.png\",\n",
    "  \"SUMMON/Sacred Cryo Pearl\": \"cardface/Summon_IceBall.png\",\n",
    "  \"SUMMON/Hydro Samachurl\": \"cardface/Summon_ShamanWater.png\",\n",
    "  \"SUMMON/Hilichurl Berserker\": \"cardface/Summon_HiliClub.png\",\n",
    "  \"SUMMON/Electro Hilichurl Shooter\": \"cardface/Summon_HiliElectric.png\",\n",
    "  \"SUMMON/Cryo Hilichurl Shooter\": \"cardface/Summon_HiliIce.png\",\n",
    "  \"SUMMON/Burning Flame\": \"cardface/Summon_Ranshaolieyan.png\",\n",
    "  \"SUMMON/Dandelion Field\": \"cardface/Summon_DandelionBreeze.png\",\n",
    "  \"SUMMON/Large Wind Spirit\": \"cardface/Summon_LargeWindSpirit.png\",\n",
    "  \"SUMMON/Guoba\": \"cardface/Summon_Guoba.png\",\n",
    "  \"SUMMON/Oceanic Mimic: Raptor\": \"cardface/Summon_Raptor.png\",\n",
    "  \"SUMMON/Talisman Spirit\": \"cardface/Summon_Shenhe.png\",\n",
    "  \"TALENT_Jadeplume Terrorshroom/Proliferating Spores\": \"cardface/Modify_Talent_Fungusgrass.png\",\n",
    "  \"TALENT_Yaoyao/Beneficent\": \"cardface/Modify_Constellation_Yaoyao.png\",\n",
    "  \"TALENT_Nahida/The Seed of Stored Knowledge\": \"cardface/Modify_Constellation_Tighnari.png\",\n",
    "  \"TALENT_Tighnari/Keen Sight\": \"cardface/Modify_Talent_Tighnari.png\",\n",
    "  \"TALENT_Collei/Floral Sidewinder\": \"cardface/Modify_Talent_Collei.png\",\n",
    "  \"TALENT_Stonehide Lawachurl/Stonehide Reforged\": \"cardface/Modify_Talent_Rockbrute.png\",\n",
    "  \"TALENT_Arataki Itto/Arataki Ichiban\": \"cardface/Modify_Talent_Itto.png\",\n",
    "  \"TALENT_Albedo/Descent of Divinity\": \"cardface/Modify_Constellation_Albedo.png\",\n",
    "  \"TALENT_Zhongli/Dominance of Earth\": \"cardface/Modify_Talent_Zhongli.png\",\n",
    "  \"TALENT_Noelle/I Got Your Back\": \"cardface/Modify_Constellation_Noel.png\",\n",
    "  \"TALENT_Ningguang/Strategic Reserve\": \"cardface/Modify_Talent_Ningguang.png\",\n",
    "  \"TALENT_Maguu Kenki/Transcendent Automaton\": \"cardface/Modify_Talent_Ningyo.png\",\n",
    "  \"TALENT_Wanderer/Gales of Reverie\": \"cardface/Modify_Talent_Wanderer.png\",\n",
    "  \"TALENT_Kaedehara Kazuha/Poetics of Fuubutsu\": \"cardface/Modify_Talent_Kazuha.png\",\n",
    "  \"TALENT_Xiao/Conqueror of Evil: Guardian Yaksha\": \"cardface/Modify_Constellation_Xiao.png\",\n",
    "  \"TALENT_Venti/Embrace of Winds\": \"cardface/Modify_Talent_Venti.png\",\n",
    "  \"TALENT_Jean/Lands of Dandelion\": \"cardface/Modify_Constellation_Qin.png\",\n",
    "  \"TALENT_Sucrose/Chaotic Entropy\": \"cardface/Modify_Constellation_Sucrose.png\",\n",
    "  \"TALENT_Electro Hypostasis/Absorbing Prism\": \"cardface/Modify_Talent_Effigyelectric.png\",\n",
    "  \"TALENT_Lisa/Pulsating Witch\": \"cardface/Modify_Constellation_Lisa.png\",\n",
    "  \"TALENT_Yae Miko/The Shrine's Sacred Shade\": \"cardface/Modify_Talent_Yae.png\",\n",
    "  \"TALENT_Raiden Shogun/Wishes Unnumbered\": \"cardface/Modify_Talent_Shougun.png\",\n",
    "  \"TALENT_Kujou Sara/Sin of Pride\": \"cardface/Modify_Constellation_Sara.png\",\n",
    "  \"TALENT_Beidou/Lightning Storm\": \"cardface/Modify_Talent_Beidou.png\",\n",
    "  \"TALENT_Cyno/Featherfall Judgment\": \"cardface/Modify_Talent_Cyno.png\",\n",
    "  \"TALENT_Razor/Awakening\": \"cardface/Modify_Talent_Razor.png\",\n",
    "  \"TALENT_Fischl/Stellar Predator\": \"cardface/Modify_Talent_Fischl.png\",\n",
    "  \"TALENT_Abyss Lector: Fathomless Flames/Embers Rekindled\": \"cardface/Modify_Talent_DeaconFire.png\",\n",
    "  \"TALENT_Fatui Pyro Agent/Paid in Full\": \"cardface/Modify_Talent_FatuiPyroAgent.png\",\n",
    "  \"TALENT_Dehya/Stalwart and True\": \"cardface/Modify_Talent_Dehya.png\",\n",
    "  \"TALENT_Yanfei/Right of Final Interpretation\": \"cardface/Modify_Constellation_Feiyan.png\",\n",
    "  \"TALENT_Hu Tao/Sanguine Rouge\": \"cardface/Modify_Talent_Hutao.png\",\n",
    "  \"TALENT_Klee/Pounding Surprise\": \"cardface/Modify_Talent_Klee.png\",\n",
    "  \"TALENT_Amber/Bunny Triggered\": \"cardface/Modify_Constellation_Ambor.png\",\n",
    "  \"TALENT_Bennett/Grand Expectation\": \"cardface/Modify_Constellation_Bennett.png\",\n",
    "  \"TALENT_Xiangling/Crossfire\": \"cardface/Modify_Talent_Xiangling.png\",\n",
    "  \"TALENT_Diluc/Flowing Flame\": \"cardface/Modify_Constellation_Diluc.png\",\n",
    "  \"TALENT_Mirror Maiden/Mirror Cage\": \"cardface/Modify_Talent_Maidenwater.png\",\n",
    "  \"TALENT_Rhodeia of Loch/Streaming Surge\": \"cardface/Modify_Talent_Chunshui.png\",\n",
    "  \"TALENT_Candace/The Overflow\": \"cardface/Modify_Constellation_Candace.png\",\n",
    "  \"TALENT_Kamisato Ayato/Kyouka Fuushi\": \"cardface/Modify_Constellation_Ayato.png\",\n",
    "  \"TALENT_Sangonomiya Kokomi/Tamakushi Casket\": \"cardface/Modify_Talent_Kokomi.png\",\n",
    "  \"TALENT_Tartaglia/Abyssal Mayhem: Hydrospout\": \"cardface/Modify_Constellation_Tartaglia.png\",\n",
    "  \"TALENT_Mona/Prophecy of Submersion\": \"cardface/Modify_Constellation_Mona.png\",\n",
    "  \"TALENT_Xingqiu/The Scent Remained\": \"cardface/Modify_Constellation_Xingqiu.png\",\n",
    "  \"TALENT_Barbara/Glorious Season\": \"cardface/Modify_Talent_Barbara.png\",\n",
    "  \"TALENT_Fatui Cryo Cicin Mage/Cicin's Cold Glare\": \"cardface/Modify_Talent_MageIce.png\",\n",
    "  \"TALENT_Qiqi/Rite of Resurrection\": \"cardface/Modify_Constellation_Qiqi.png\",\n",
    "  \"TALENT_Shenhe/Mystical Abandon\": \"cardface/Modify_Constellation_Shenhe.png\",\n",
    "  \"TALENT_Eula/Wellspring of War-Lust\": \"cardface/Modify_Talent_Eula.png\",\n",
    "  \"TALENT_Kamisato Ayaka/Kanten Senmyou Blessing\": \"cardface/Modify_Talent_Ayaka.png\",\n",
    "  \"TALENT_Chongyun/Steady Breathing\": \"cardface/Modify_Talent_Chongyun.png\",\n",
    "  \"TALENT_Kaeya/Cold-Blooded Strike\": \"cardface/Modify_Talent_Keaya.png\",\n",
    "  \"TALENT_Diona/Shaken, Not Purred\": \"cardface/Modify_Constellation_Diona.png\",\n",
    "  \"TALENT_Ganyu/Undivided Heart\": \"cardface/Modify_Talent_Ganyu.png\",\n",
    "  \"TALENT_Yoimiya/Naganohara Meteor Swarm\": \"cardface/Modify_Constellation_Yoyimiya.png\",\n",
    "  \"TALENT_Keqing/Thundering Penance\": \"cardface/Modify_Talent_Keqing.png\",\n",
    "  \"WEAPON/Magic Guide\": \"cardface/Modify_Weapon_CatalystIntro.png\",\n",
    "  \"WEAPON/Sacrificial Fragments\": \"cardface/Modify_Weapon_CatalystFossil.png\",\n",
    "  \"WEAPON/Skyward Atlas\": \"cardface/Modify_Weapon_CatalystDvalin.png\",\n",
    "  \"WEAPON/A Thousand Floating Dreams\": \"cardface/Modify_Weapon_Ayus.png\",\n",
    "  \"WEAPON/Fruit of Fulfillment\": \"cardface/Modify_Weapon_Arakalari.png\",\n",
    "  \"WEAPON/Raven Bow\": \"cardface/Modify_Weapon_BowCrowfeather.png\",\n",
    "  \"WEAPON/Sacrificial Bow\": \"cardface/Modify_Weapon_BowFossil.png\",\n",
    "  \"WEAPON/Skyward Harp\": \"cardface/Modify_Weapon_BowDvalin.png\",\n",
    "  \"WEAPON/Amos' Bow\": \"cardface/Modify_Weapon_Amos.png\",\n",
    "  \"WEAPON/Elegy for the End\": \"cardface/Modify_Weapon_Widsith.png\",\n",
    "  \"WEAPON/King's Squire\": \"cardface/Modify_Weapon_Wangxia.png\",\n",
    "  \"WEAPON/White Iron Greatsword\": \"cardface/Modify_Weapon_ClaymoreTin.png\",\n",
    "  \"WEAPON/Sacrificial Greatsword\": \"cardface/Modify_Weapon_Fossil.png\",\n",
    "  \"WEAPON/Wolf's Gravestone\": \"cardface/Modify_Weapon_ClaymoreWolfmound.png\",\n",
    "  \"WEAPON/Skyward Pride\": \"cardface/Modify_Weapon_ClaymoreDvalin.png\",\n",
    "  \"WEAPON/The Bell\": \"cardface/Modify_Weapon_Troupe.png\",\n",
    "  \"WEAPON/White Tassel\": \"cardface/Modify_Weapon_PoleRuby.png\",\n",
    "  \"WEAPON/Lithic Spear\": \"cardface/Modify_Weapon_PoleLapis.png\",\n",
    "  \"WEAPON/Skyward Spine\": \"cardface/Modify_Weapon_PoleDvalin.png\",\n",
    "  \"WEAPON/Vortex Vanquisher\": \"cardface/Modify_Weapon_Kunwu.png\",\n",
    "  \"WEAPON/Engulfing Lightning\": \"cardface/Modify_Weapon_Narukami.png\",\n",
    "  \"WEAPON/Moonpiercer\": \"cardface/Modify_Weapon_Guanyue.png\",\n",
    "  \"WEAPON/Traveler's Handy Sword\": \"cardface/Modify_Weapon_SwordDarker.png\",\n",
    "  \"WEAPON/Sacrificial Sword\": \"cardface/Modify_Weapon_SwordFossil.png\",\n",
    "  \"WEAPON/Aquila Favonia\": \"cardface/Modify_Weapon_SwordFalcon.png\",\n",
    "  \"WEAPON/Skyward Blade\": \"cardface/Modify_Weapon_SwordDvalin.png\",\n",
    "  \"WEAPON/Favonius Sword\": \"cardface/Modify_Weapon_Xifengjian.png\",\n",
    "  \"ARTIFACT/Adventurer's Bandana\": \"cardface/Modify_Artifact_MaoxianjiaDanjian.png\",\n",
    "  \"ARTIFACT/Lucky Dog's Silver Circlet\": \"cardface/Modify_Artifact_XingyunerDanjian.png\",\n",
    "  \"ARTIFACT/Traveling Doctor's Handkerchief\": \"cardface/Modify_Artifact_YouyiDanjian.png\",\n",
    "  \"ARTIFACT/Gambler's Earrings\": \"cardface/Modify_Artifact_DutuDanjian.png\",\n",
    "  \"ARTIFACT/Instructor's Cap\": \"cardface/Modify_Artifact_JiaoguanDanjian.png\",\n",
    "  \"ARTIFACT/Exile's Circlet\": \"cardface/Modify_Artifact_LiufangzheDanjian.png\",\n",
    "  \"ARTIFACT/Ornate Kabuto\": \"cardface/Modify_Artifact_Huashi.png\",\n",
    "  \"ARTIFACT/Emblem of Severed Fate\": \"cardface/Modify_Artifact_JueyuanTaozhuang.png\",\n",
    "  \"ARTIFACT/General's Ancient Helm\": \"cardface/Modify_Artifact_Jiangshuai.png\",\n",
    "  \"ARTIFACT/Tenacity of the Millelith\": \"cardface/Modify_Artifact_QianyanTaozhuang.png\",\n",
    "  \"ARTIFACT/Thundering Poise\": \"cardface/Modify_Artifact_ChenshaDanjian.png\",\n",
    "  \"ARTIFACT/Vermillion Hereafter\": \"cardface/Modify_Artifact_ChenshaTaozhuang.png\",\n",
    "  \"ARTIFACT/Capricious Visage\": \"cardface/Modify_Artifact_Zhuiyidanjian.png\",\n",
    "  \"ARTIFACT/Shimenawa's Reminiscence\": \"cardface/Modify_Artifact_ZhuiyiTaozhuang.png\",\n",
    "  \"ARTIFACT/Crown of Watatsumi\": \"cardface/Modify_Artifact_HaiRanDanJian.png\",\n",
    "  \"ARTIFACT/Broken Rime's Echo\": \"cardface/Modify_Artifact_BinDanjian.png\",\n",
    "  \"ARTIFACT/Blizzard Strayer\": \"cardface/Modify_Artifact_BinTaozhuang.png\",\n",
    "  \"ARTIFACT/Wine-Stained Tricorne\": \"cardface/Modify_Artifact_Shuidanjian.png\",\n",
    "  \"ARTIFACT/Heart of Depth\": \"cardface/Modify_Artifact_Shuitaozhuang.png\",\n",
    "  \"ARTIFACT/Witch's Scorching Hat\": \"cardface/Modify_Artifact_Monvdanjian.png\",\n",
    "  \"ARTIFACT/Crimson Witch of Flames\": \"cardface/Modify_Artifact_Monvtaozhuang.png\",\n",
    "  \"ARTIFACT/Thunder Summoner's Crown\": \"cardface/Modify_Artifact_Leidanjia.png\",\n",
    "  \"ARTIFACT/Thundering Fury\": \"cardface/Modify_Artifact_Leitaozhuang.png\",\n",
    "  \"ARTIFACT/Viridescent Venerer's Diadem\": \"cardface/Modify_Artifact_FengDanjian.png\",\n",
    "  \"ARTIFACT/Viridescent Venerer\": \"cardface/Modify_Artifact_FengTaozhuang.png\",\n",
    "  \"ARTIFACT/Mask of Solitude Basalt\": \"cardface/Modify_Artifact_YanDanjian.png\",\n",
    "  \"ARTIFACT/Archaic Petra\": \"cardface/Modify_Artifact_YanTaozhuang.png\",\n",
    "  \"ARTIFACT/Laurel Coronet\": \"cardface/Modify_Artifact_CaoDanjian.png\",\n",
    "  \"ARTIFACT/Deepwood Memories\": \"cardface/Modify_Artifact_CaoTaozhuang.png\",\n",
    "  \"SUPPORT/Liyue Harbor Wharf\": \"cardface/Assist_Location_LiyueHarbor.png\",\n",
    "  \"SUPPORT/Knights of Favonius Library\": \"cardface/Assist_Location_MdLibrary.png\",\n",
    "  \"SUPPORT/Jade Chamber\": \"cardface/Assist_Location_Qunyuge.png\",\n",
    "  \"SUPPORT/Dawn Winery\": \"cardface/Assist_Location_Chenxijiuzhuang.png\",\n",
    "  \"SUPPORT/Wangshu Inn\": \"cardface/Assist_Location_Wangshukezhan.png\",\n",
    "  \"SUPPORT/Favonius Cathedral\": \"cardface/Assist_Location_FavoniusChurch.png\",\n",
    "  \"SUPPORT/Tenshukaku\": \"cardface/Assist_Location_Tianshou.png\",\n",
    "  \"SUPPORT/Grand Narukami Shrine\": \"cardface/Assist_Location_Mingshendashe.png\",\n",
    "  \"SUPPORT/Sangonomiya Shrine\": \"cardface/Assist_Location_Shanhu.png\",\n",
    "  \"SUPPORT/Sumeru City\": \"cardface/Assist_Location_Xumi.png\",\n",
    "  \"SUPPORT/Vanarana\": \"cardface/Assist_Location_Hengna.png\",\n",
    "  \"SUPPORT/Chinju Forest\": \"cardface/Assist_Location_Zhengshoui.png\",\n",
    "  \"SUPPORT/Golden House\": \"cardface/Assist_Location_Huangjinwu.png\",\n",
    "  \"SUPPORT/Gandharva Ville\": \"cardface/Assist_Location_Gandharva.png\",\n",
    "  \"SUPPORT/Paimon\": \"cardface/Assist_NPC_Paimon.png\",\n",
    "  \"SUPPORT/Katheryne\": \"cardface/Assist_NPC_Katheryne.png\",\n",
    "  \"SUPPORT/Timaeus\": \"cardface/Assist_NPC_Timaeus.png\",\n",
    "  \"SUPPORT/Wagner\": \"cardface/Assist_NPC_Wagner.png\",\n",
    "  \"SUPPORT/Chef Mao\": \"cardface/Assist_NPC_Maoshifu.png\",\n",
    "  \"SUPPORT/Tubby\": \"cardface/Assist_NPC_AYuan.png\",\n",
    "  \"SUPPORT/Timmie\": \"cardface/Assist_NPC_Timmy.png\",\n",
    "  \"SUPPORT/Liben\": \"cardface/Assist_NPC_LiBen.png\",\n",
    "  \"SUPPORT/Chang the Ninth\": \"cardface/Assist_NPC_Changjiuye.png\",\n",
    "  \"SUPPORT/Ellin\": \"cardface/Assist_NPC_Aileen.png\",\n",
    "  \"SUPPORT/Iron Tongue Tian\": \"cardface/Assist_NPC_Tiantiezui.png\",\n",
    "  \"SUPPORT/Liu Su\": \"cardface/Assist_NPC_Liusu.png\",\n",
    "  \"SUPPORT/Hanachirusato\": \"cardface/Assist_NPC_Huasanli.png\",\n",
    "  \"SUPPORT/Kid Kujirai\": \"cardface/Assist_NPC_Yingjin.png\",\n",
    "  \"SUPPORT/Xudong\": \"cardface/Assist_NPC_Xudong.png\",\n",
    "  \"SUPPORT/Dunyarzad\": \"cardface/Assist_NPC_Dina.png\",\n",
    "  \"SUPPORT/Rana\": \"cardface/Assist_NPC_Lana.png\",\n",
    "  \"SUPPORT/Master Zhang\": \"cardface/Assist_NPC_Laozhang.png\",\n",
    "  \"SUPPORT/Setaria\": \"cardface/Assist_NPC_Saileita.png\",\n",
    "  \"SUPPORT/Yayoi Nanatsuki\": \"cardface/Assist_NPC_Yayoyi.png\",\n",
    "  \"SUPPORT/Parametric Transformer\": \"cardface/Assist_Prop_ParametricTransformer.png\",\n",
    "  \"SUPPORT/NRE\": \"cardface/Assist_Prop_NREMenu.png\",\n",
    "  \"SUPPORT/Red Feather Fan\": \"cardface/Assist_Prop_Hongye.png\",\n",
    "  \"SUPPORT/Treasure-Seeking Seelie\": \"cardface/Assist_Prop_Xunbao.png\",\n",
    "  \"ARCANE/Ancient Courtyard\": \"cardface/Event_Event_Jiangjun.png\",\n",
    "  \"ARCANE/Covenant of Rock\": \"cardface/Event_Event_Chuanglong.png\",\n",
    "  \"ARCANE/Joyous Celebration\": \"cardface/Event_Event_Qingdian.png\",\n",
    "  \"ARCANE/Fresh Wind of Freedom\": \"cardface/Event_Event_Xinfeng.png\",\n",
    "  \"CARD/Elemental Resonance: Woven Ice\": \"cardface/Event_ResonanceB_Ice.png\",\n",
    "  \"CARD/Elemental Resonance: Shattering Ice\": \"cardface/Event_ResonanceA_Ice.png\",\n",
    "  \"CARD/Elemental Resonance: Woven Waters\": \"cardface/Event_ResonanceB_Water.png\",\n",
    "  \"CARD/Elemental Resonance: Soothing Water\": \"cardface/Event_ResonanceA_Water.png\",\n",
    "  \"CARD/Elemental Resonance: Woven Flames\": \"cardface/Event_ResonanceB_Fire.png\",\n",
    "  \"CARD/Elemental Resonance: Fervent Flames\": \"cardface/Event_ResonanceA_Fire.png\",\n",
    "  \"CARD/Elemental Resonance: Woven Thunder\": \"cardface/Event_ResonanceB_Electric.png\",\n",
    "  \"CARD/Elemental Resonance: High Voltage\": \"cardface/Event_ResonanceA_Electric.png\",\n",
    "  \"CARD/Elemental Resonance: Woven Winds\": \"cardface/Event_ResonanceB_Wind.png\",\n",
    "  \"CARD/Elemental Resonance: Impetuous Winds\": \"cardface/Event_ResonanceA_Wind.png\",\n",
    "  \"CARD/Elemental Resonance: Woven Stone\": \"cardface/Event_ResonanceB_Rock.png\",\n",
    "  \"CARD/Elemental Resonance: Enduring Rock\": \"cardface/Event_ResonanceA_Rock.png\",\n",
    "  \"CARD/Elemental Resonance: Woven Weeds\": \"cardface/Event_ResonanceB_Grass.png\",\n",
    "  \"CARD/Elemental Resonance: Sprawling Greenery\": \"cardface/Event_ResonanceA_Grass.png\",\n",
    "  \"CARD/Wind and Freedom\": \"cardface/Event_Event_Fengyuziyou.png\",\n",
    "  \"CARD/Thunder and Eternity\": \"cardface/Event_Event_Leiyuyongheng.png\",\n",
    "  \"CARD/Stone and Contracts\": \"cardface/Event_Event_Yanyuqiyue.png\",\n",
    "  \"CARD/Nature and Wisdom\": \"cardface/Event_Event_Caoyuzhihui.png\",\n",
    "  \"CARD/The Bestest Travel Companion!\": \"cardface/Event_Event_BestAibo.png\",\n",
    "  \"CARD/Changing Shifts\": \"cardface/Event_Event_Huanbanshijian.png\",\n",
    "  \"CARD/Toss-Up\": \"cardface/Event_Event_Yizhiqiankun.png\",\n",
    "  \"CARD/Strategize\": \"cardface/Event_Event_Yunchouweiwo.png\",\n",
    "  \"CARD/I Haven't Lost Yet!\": \"cardface/Event_Event_Bendayehaimeiyoushu.png\",\n",
    "  \"CARD/Leave It to Me!\": \"cardface/Event_Event_Jiaogeiwoba.png\",\n",
    "  \"CARD/When the Crane Returned\": \"cardface/Event_Event_Heguizhishi.png\",\n",
    "  \"CARD/Starsigns\": \"cardface/Event_Event_Xingtian.png\",\n",
    "  \"CARD/Calx's Arts\": \"cardface/Event_Event_Baiezhishu.png\",\n",
    "  \"CARD/Master of Weaponry\": \"cardface/Event_Event_Zhuwujingtong.png\",\n",
    "  \"CARD/Blessing of the Divine Relic's Installation\": \"cardface/Event_Event_Shenbaoqiangongzhuci.png\",\n",
    "  \"CARD/Quick Knit\": \"cardface/Event_Event_Kuaikuaifengbushu.png\",\n",
    "  \"CARD/Send Off\": \"cardface/Event_Event_Songniyicheng.png\",\n",
    "  \"CARD/Guardian's Oath\": \"cardface/Event_Event_Hufazhishi.png\",\n",
    "  \"CARD/Abyssal Summons\": \"cardface/Event_Event_Abyssdehuhuan.png\",\n",
    "  \"CARD/Fatui Conspiracy\": \"cardface/Event_Event_Yurenzhongi.png\",\n",
    "  \"CARD/Plunging Strike\": \"cardface/Event_Event_Xialuo.png\",\n",
    "  \"CARD/Heavy Strike\": \"cardface/Event_Event_Zhonggongji.png\",\n",
    "  \"CARD/The Legend of Vennessa\": \"cardface/Event_Event_Wennisha.png\",\n",
    "  \"CARD/Friendship Eternal\": \"cardface/Event_Event_Yongyuandeyouyi.png\",\n",
    "  \"CARD/Rhythm of the Great Dream\": \"cardface/Event_Event_Dameng.png\",\n",
    "  \"CARD/Where Is the Unseen Razor?\": \"cardface/Event_Event_Cangfen.png\",\n",
    "  \"CARD/Pankration!\": \"cardface/Event_Event_Heiquan.png\",\n",
    "  \"CARD/Jueyun Guoba\": \"cardface/Event_Food_Jueyunguoba.png\",\n",
    "  \"CARD/Adeptus' Temptation\": \"cardface/Event_Food_XTQ.png\",\n",
    "  \"CARD/Lotus Flower Crisp\": \"cardface/Event_Food_Lianhuasu.png\",\n",
    "  \"CARD/Northern Smoked Chicken\": \"cardface/Event_Food_Beidiyanxunji.png\",\n",
    "  \"CARD/Sweet Madame\": \"cardface/Event_Food_Huaniangji.png\",\n",
    "  \"CARD/Mondstadt Hash Brown\": \"cardface/Event_Food_Tudoubin.png\",\n",
    "  \"CARD/Mushroom Pizza\": \"cardface/Event_Food_Kaomogupisa.png\",\n",
    "  \"CARD/Minty Meat Rolls\": \"cardface/Event_Food_Bohejuan.png\",\n",
    "  \"CARD/Teyvat Fried Egg\": \"cardface/Event_Food_Jiandan.png\",\n",
    "  \"CARD/Sashimi Platter\": \"cardface/Event_Food_Cishen.png\",\n",
    "  \"CARD/Tandoori Roast Chicken\": \"cardface/Event_Food_Tangduer.png\",\n",
    "  \"CARD/Butter Crab\": \"cardface/Event_Food_Huangyou.png\",\n",
    "  \"TALENT_Keqing/Lightning Stiletto\": \"cardface/Summon_Keqing.png\",\n",
    "  \"TEAM_STATUS/Fatui Ambusher: Electrohammer Vanguard\": \"status/Event_Fatui_Elec.png\",\n",
    "  \"TEAM_STATUS/Fatui Ambusher: Pyroslinger Bracer\": \"status/Event_Fatui_Fire.png\",\n",
    "  \"TEAM_STATUS/Fatui Ambusher: Mirror Maiden\": \"status/Event_Fatui_Water.png\",\n",
    "  \"TEAM_STATUS/Fatui Ambusher: Cryo Cicin Mage\": \"status/Event_Fatui_Ice.png\",\n",
    "  \"TEAM_STATUS/Thunderbeast's Targe\": \"status/Beidou_E.png\",\n",
    "  \"TEAM_STATUS/Tenko Thunderbolts\": \"status/Yae_E.png\",\n",
    "  \"TEAM_STATUS/Fortune-Preserving Talisman\": \"status/Qiqi_E.png\",\n",
    "  \"TEAM_STATUS/Icicle\": \"status/Kaeya_E.png\",\n",
    "  \"TEAM_STATUS/Pyronado\": \"status/Xiangling_E.png\",\n",
    "  \"TEAM_STATUS/Aurous Blaze\": \"status/Yoimiya_E.png\",\n",
    "  \"TEAM_STATUS/Inspiration Field\": \"status/Bennett_E.png\",\n",
    "  \"TEAM_STATUS/Sparks 'n' Splash\": \"status/Klee_E.png\",\n",
    "  \"TEAM_STATUS/Adeptal Legacy\": \"status/Yaoyao_E.png\",\n",
    "  \"TEAM_STATUS/Shrine of Maya\": \"status/Nahida_E.png\",\n",
    "  \"TEAM_STATUS/Prayer of the Crimson Crown\": \"status/Candace_E.png\",\n",
    "  \"TEAM_STATUS/Rainbow Bladework\": \"status/Xingqiu_E.png\",\n",
    "  \"TEAM_STATUS/Illusory Bubble\": \"status/Mona_E.png\",\n",
    "  \"TEAM_STATUS/Dendro Core\": \"status/Reaction_116.png\",\n",
    "  \"TEAM_STATUS/Catalyzing Field\": \"status/Reaction_117.png\",\n",
    "  \"CHARACTER_STATUS/Ceremonial Garment\": \"status/Kokomi_E.png\",\n",
    "  \"CHARACTER_STATUS/Melee Stance\": \"status/Tartaglia_S_01.png\",\n",
    "  \"CHARACTER_STATUS/Ranged Stance\": \"status/Tartaglia_S_02.png\",\n",
    "  \"CHARACTER_STATUS/Riptide\": \"status/Tartaglia_S_03.png\",\n",
    "  \"CHARACTER_STATUS/Yaksha's Mask\": \"status/Xiao_E.png\",\n",
    "  \"CHARACTER_STATUS/Pactsworn Pathclearer\": \"status/Cyno_E.png\",\n",
    "  \"CHARACTER_STATUS/The Wolf Within\": \"status/Razor_E.png\",\n",
    "  \"CHARACTER_STATUS/Chakra Desiderata\": \"status/Shougun_E.png\",\n",
    "  \"CHARACTER_STATUS/Petrification\": \"status/Zhongli_E.png\",\n",
    "  \"CHARACTER_STATUS/Raging Oni King\": \"status/Itto_E.png\",\n",
    "  \"CHARACTER_STATUS/Sweeping Time\": \"status/Noel_E.png\",\n",
    "  \"CHARACTER_STATUS/Radical Vitality\": \"status/FungusRaptor_S.png\",\n",
    "  \"CHARACTER_STATUS/Seed of Skandha\": \"status/Nahida_S.png\",\n",
    "  \"CHARACTER_STATUS/Brilliance\": \"status/Feiyan_E.png\"\n",
    "}\n",
    "'''"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "name_id_json = '''\n",
    "{\n",
    "  \"Ganyu\": 1101,\n",
    "  \"Diona\": 1102,\n",
    "  \"Kaeya\": 1103,\n",
    "  \"Chongyun\": 1104,\n",
    "  \"Kamisato Ayaka\": 1105,\n",
    "  \"Eula\": 1106,\n",
    "  \"Shenhe\": 1107,\n",
    "  \"Qiqi\": 1108,\n",
    "  \"Barbara\": 1201,\n",
    "  \"Xingqiu\": 1202,\n",
    "  \"Mona\": 1203,\n",
    "  \"Tartaglia\": 1204,\n",
    "  \"Sangonomiya Kokomi\": 1205,\n",
    "  \"Kamisato Ayato\": 1206,\n",
    "  \"Candace\": 1207,\n",
    "  \"Nilou\": 1208,\n",
    "  \"Diluc\": 1301,\n",
    "  \"Xiangling\": 1302,\n",
    "  \"Bennett\": 1303,\n",
    "  \"Amber\": 1304,\n",
    "  \"Yoimiya\": 1305,\n",
    "  \"Klee\": 1306,\n",
    "  \"Hu Tao\": 1307,\n",
    "  \"Yanfei\": 1308,\n",
    "  \"Dehya\": 1309,\n",
    "  \"Fischl\": 1401,\n",
    "  \"Razor\": 1402,\n",
    "  \"Keqing\": 1403,\n",
    "  \"Cyno\": 1404,\n",
    "  \"Beidou\": 1405,\n",
    "  \"Kujou Sara\": 1406,\n",
    "  \"Raiden Shogun\": 1407,\n",
    "  \"Yae Miko\": 1408,\n",
    "  \"Lisa\": 1409,\n",
    "  \"Dori\": 1410,\n",
    "  \"Sucrose\": 1501,\n",
    "  \"Jean\": 1502,\n",
    "  \"Venti\": 1503,\n",
    "  \"Xiao\": 1504,\n",
    "  \"Kaedehara Kazuha\": 1505,\n",
    "  \"Wanderer\": 1506,\n",
    "  \"Ningguang\": 1601,\n",
    "  \"Noelle\": 1602,\n",
    "  \"Zhongli\": 1603,\n",
    "  \"Albedo\": 1604,\n",
    "  \"Arataki Itto\": 1605,\n",
    "  \"Collei\": 1701,\n",
    "  \"Tighnari\": 1702,\n",
    "  \"Nahida\": 1703,\n",
    "  \"Yaoyao\": 1704,\n",
    "  \"Baizhu\": 1705,\n",
    "  \"Fatui Cryo Cicin Mage\": 2101,\n",
    "  \"Rhodeia of Loch\": 2201,\n",
    "  \"Mirror Maiden\": 2202,\n",
    "  \"Fatui Pyro Agent\": 2301,\n",
    "  \"Abyss Lector: Fathomless Flames\": 2302,\n",
    "  \"Electro Hypostasis\": 2401,\n",
    "  \"Maguu Kenki\": 2501,\n",
    "  \"Stonehide Lawachurl\": 2601,\n",
    "  \"Jadeplume Terrorshroom\": 2701,\n",
    "  \"CryoMob\": 9101,\n",
    "  \"CryoMobMage\": 9102,\n",
    "  \"HydroMob\": 9201,\n",
    "  \"HydroMobMage\": 9202,\n",
    "  \"PyroMob\": 9301,\n",
    "  \"PyroMobMage\": 9302,\n",
    "  \"ElectroMob\": 9401,\n",
    "  \"ElectroMobMage\": 9402,\n",
    "  \"AnemoMob\": 9501,\n",
    "  \"AnemoMobMage\": 9502,\n",
    "  \"GeoMob\": 9601,\n",
    "  \"GeoMobMage\": 9602,\n",
    "  \"DendroMob\": 9701,\n",
    "  \"DendroMobMage\": 9702,\n",
    "  \"PhysicalMob\": 9801,\n",
    "  \"Undivided Heart\": 211011,\n",
    "  \"Shaken, Not Purred\": 211021,\n",
    "  \"Cold-Blooded Strike\": 211031,\n",
    "  \"Steady Breathing\": 211041,\n",
    "  \"Kanten Senmyou Blessing\": 211051,\n",
    "  \"Wellspring of War-Lust\": 211061,\n",
    "  \"Mystical Abandon\": 211071,\n",
    "  \"Rite of Resurrection\": 211081,\n",
    "  \"Glorious Season\": 212011,\n",
    "  \"The Scent Remained\": 212021,\n",
    "  \"Prophecy of Submersion\": 212031,\n",
    "  \"Abyssal Mayhem: Hydrospout\": 212041,\n",
    "  \"Tamakushi Casket\": 212051,\n",
    "  \"Kyouka Fuushi\": 212061,\n",
    "  \"The Overflow\": 212071,\n",
    "  \"The Starry Skies Their Flowers Rain\": 212081,\n",
    "  \"Flowing Flame\": 213011,\n",
    "  \"Crossfire\": 213021,\n",
    "  \"Grand Expectation\": 213031,\n",
    "  \"Bunny Triggered\": 213041,\n",
    "  \"Naganohara Meteor Swarm\": 213051,\n",
    "  \"Pounding Surprise\": 213061,\n",
    "  \"Sanguine Rouge\": 213071,\n",
    "  \"Right of Final Interpretation\": 213081,\n",
    "  \"Stalwart and True\": 213091,\n",
    "  \"Stellar Predator\": 214011,\n",
    "  \"Awakening\": 214021,\n",
    "  \"Thundering Penance\": 214031,\n",
    "  \"Lightning Stiletto\": 214032,\n",
    "  \"Featherfall Judgment\": 214041,\n",
    "  \"Lightning Storm\": 214051,\n",
    "  \"Sin of Pride\": 214061,\n",
    "  \"Wishes Unnumbered\": 214071,\n",
    "  \"The Shrine's Sacred Shade\": 214081,\n",
    "  \"Pulsating Witch\": 214091,\n",
    "  \"Discretionary Supplement\": 214101,\n",
    "  \"Chaotic Entropy\": 215011,\n",
    "  \"Lands of Dandelion\": 215021,\n",
    "  \"Embrace of Winds\": 215031,\n",
    "  \"Conqueror of Evil: Guardian Yaksha\": 215041,\n",
    "  \"Poetics of Fuubutsu\": 215051,\n",
    "  \"Gales of Reverie\": 215061,\n",
    "  \"Strategic Reserve\": 216011,\n",
    "  \"I Got Your Back\": 216021,\n",
    "  \"Dominance of Earth\": 216031,\n",
    "  \"Descent of Divinity\": 216041,\n",
    "  \"Arataki Ichiban\": 216051,\n",
    "  \"Floral Sidewinder\": 217011,\n",
    "  \"Keen Sight\": 217021,\n",
    "  \"The Seed of Stored Knowledge\": 217031,\n",
    "  \"Beneficent\": 217041,\n",
    "  \"All Things Are of the Earth\": 217051,\n",
    "  \"Cicin's Cold Glare\": 221011,\n",
    "  \"Streaming Surge\": 222011,\n",
    "  \"Mirror Cage\": 222021,\n",
    "  \"Paid in Full\": 223011,\n",
    "  \"Embers Rekindled\": 223021,\n",
    "  \"Absorbing Prism\": 224011,\n",
    "  \"Transcendent Automaton\": 225011,\n",
    "  \"Stonehide Reforged\": 226011,\n",
    "  \"Proliferating Spores\": 227011,\n",
    "  \"Magic Guide\": 311101,\n",
    "  \"Sacrificial Fragments\": 311102,\n",
    "  \"Skyward Atlas\": 311103,\n",
    "  \"A Thousand Floating Dreams\": 311104,\n",
    "  \"Fruit of Fulfillment\": 311105,\n",
    "  \"Raven Bow\": 311201,\n",
    "  \"Sacrificial Bow\": 311202,\n",
    "  \"Skyward Harp\": 311203,\n",
    "  \"Amos' Bow\": 311204,\n",
    "  \"Elegy for the End\": 311205,\n",
    "  \"King's Squire\": 311206,\n",
    "  \"White Iron Greatsword\": 311301,\n",
    "  \"Sacrificial Greatsword\": 311302,\n",
    "  \"Wolf's Gravestone\": 311303,\n",
    "  \"Skyward Pride\": 311304,\n",
    "  \"The Bell\": 311305,\n",
    "  \"White Tassel\": 311401,\n",
    "  \"Lithic Spear\": 311402,\n",
    "  \"Skyward Spine\": 311403,\n",
    "  \"Vortex Vanquisher\": 311404,\n",
    "  \"Engulfing Lightning\": 311405,\n",
    "  \"Moonpiercer\": 311406,\n",
    "  \"Traveler's Handy Sword\": 311501,\n",
    "  \"Sacrificial Sword\": 311502,\n",
    "  \"Aquila Favonia\": 311503,\n",
    "  \"Skyward Blade\": 311504,\n",
    "  \"Favonius Sword\": 311505,\n",
    "  \"Adventurer's Bandana\": 312001,\n",
    "  \"Lucky Dog's Silver Circlet\": 312002,\n",
    "  \"Traveling Doctor's Handkerchief\": 312003,\n",
    "  \"Gambler's Earrings\": 312004,\n",
    "  \"Instructor's Cap\": 312005,\n",
    "  \"Exile's Circlet\": 312006,\n",
    "  \"Ornate Kabuto\": 312007,\n",
    "  \"Emblem of Severed Fate\": 312008,\n",
    "  \"General's Ancient Helm\": 312009,\n",
    "  \"Tenacity of the Millelith\": 312010,\n",
    "  \"Thundering Poise\": 312011,\n",
    "  \"Vermillion Hereafter\": 312012,\n",
    "  \"Capricious Visage\": 312013,\n",
    "  \"Shimenawa's Reminiscence\": 312014,\n",
    "  \"Crown of Watatsumi\": 312015,\n",
    "  \"Ocean-Hued Clam\": 312016,\n",
    "  \"Shadow of the Sand King\": 312017,\n",
    "  \"Broken Rime's Echo\": 312101,\n",
    "  \"Blizzard Strayer\": 312102,\n",
    "  \"Wine-Stained Tricorne\": 312201,\n",
    "  \"Heart of Depth\": 312202,\n",
    "  \"Witch's Scorching Hat\": 312301,\n",
    "  \"Crimson Witch of Flames\": 312302,\n",
    "  \"Thunder Summoner's Crown\": 312401,\n",
    "  \"Thundering Fury\": 312402,\n",
    "  \"Viridescent Venerer's Diadem\": 312501,\n",
    "  \"Viridescent Venerer\": 312502,\n",
    "  \"Mask of Solitude Basalt\": 312601,\n",
    "  \"Archaic Petra\": 312602,\n",
    "  \"Laurel Coronet\": 312701,\n",
    "  \"Deepwood Memories\": 312702,\n",
    "  \"Liyue Harbor Wharf\": 321001,\n",
    "  \"Knights of Favonius Library\": 321002,\n",
    "  \"Jade Chamber\": 321003,\n",
    "  \"Dawn Winery\": 321004,\n",
    "  \"Wangshu Inn\": 321005,\n",
    "  \"Favonius Cathedral\": 321006,\n",
    "  \"Tenshukaku\": 321007,\n",
    "  \"Grand Narukami Shrine\": 321008,\n",
    "  \"Sangonomiya Shrine\": 321009,\n",
    "  \"Sumeru City\": 321010,\n",
    "  \"Vanarana\": 321011,\n",
    "  \"Chinju Forest\": 321012,\n",
    "  \"Golden House\": 321013,\n",
    "  \"Gandharva Ville\": 321014,\n",
    "  \"Stormterror's Lair\": 321015,\n",
    "  \"Paimon\": 322001,\n",
    "  \"Katheryne\": 322002,\n",
    "  \"Timaeus\": 322003,\n",
    "  \"Wagner\": 322004,\n",
    "  \"Chef Mao\": 322005,\n",
    "  \"Tubby\": 322006,\n",
    "  \"Timmie\": 322007,\n",
    "  \"Liben\": 322008,\n",
    "  \"Chang the Ninth\": 322009,\n",
    "  \"Ellin\": 322010,\n",
    "  \"Iron Tongue Tian\": 322011,\n",
    "  \"Liu Su\": 322012,\n",
    "  \"Hanachirusato\": 322013,\n",
    "  \"Kid Kujirai\": 322014,\n",
    "  \"Xudong\": 322015,\n",
    "  \"Dunyarzad\": 322016,\n",
    "  \"Rana\": 322017,\n",
    "  \"Master Zhang\": 322018,\n",
    "  \"Setaria\": 322019,\n",
    "  \"Yayoi Nanatsuki\": 322020,\n",
    "  \"Parametric Transformer\": 323001,\n",
    "  \"NRE\": 323002,\n",
    "  \"Red Feather Fan\": 323003,\n",
    "  \"Treasure-Seeking Seelie\": 323004,\n",
    "  \"Ancient Courtyard\": 330001,\n",
    "  \"Covenant of Rock\": 330002,\n",
    "  \"Joyous Celebration\": 330003,\n",
    "  \"Fresh Wind of Freedom\": 330004,\n",
    "  \"In Every House a Stove\": 330005,\n",
    "  \"Elemental Resonance: Woven Ice\": 331101,\n",
    "  \"Elemental Resonance: Shattering Ice\": 331102,\n",
    "  \"Elemental Resonance: Woven Waters\": 331201,\n",
    "  \"Elemental Resonance: Soothing Water\": 331202,\n",
    "  \"Elemental Resonance: Woven Flames\": 331301,\n",
    "  \"Elemental Resonance: Fervent Flames\": 331302,\n",
    "  \"Elemental Resonance: Woven Thunder\": 331401,\n",
    "  \"Elemental Resonance: High Voltage\": 331402,\n",
    "  \"Elemental Resonance: Woven Winds\": 331501,\n",
    "  \"Elemental Resonance: Impetuous Winds\": 331502,\n",
    "  \"Elemental Resonance: Woven Stone\": 331601,\n",
    "  \"Elemental Resonance: Enduring Rock\": 331602,\n",
    "  \"Elemental Resonance: Woven Weeds\": 331701,\n",
    "  \"Elemental Resonance: Sprawling Greenery\": 331702,\n",
    "  \"Wind and Freedom\": 331801,\n",
    "  \"Stone and Contracts\": 331802,\n",
    "  \"Thunder and Eternity\": 331803,\n",
    "  \"Nature and Wisdom\": 331804,\n",
    "  \"The Bestest Travel Companion!\": 332001,\n",
    "  \"Changing Shifts\": 332002,\n",
    "  \"Toss-Up\": 332003,\n",
    "  \"Strategize\": 332004,\n",
    "  \"I Haven't Lost Yet!\": 332005,\n",
    "  \"Leave It to Me!\": 332006,\n",
    "  \"When the Crane Returned\": 332007,\n",
    "  \"Starsigns\": 332008,\n",
    "  \"Calx's Arts\": 332009,\n",
    "  \"Master of Weaponry\": 332010,\n",
    "  \"Blessing of the Divine Relic's Installation\": 332011,\n",
    "  \"Quick Knit\": 332012,\n",
    "  \"Send Off\": 332013,\n",
    "  \"Guardian's Oath\": 332014,\n",
    "  \"Abyssal Summons\": 332015,\n",
    "  \"Fatui Conspiracy\": 332016,\n",
    "  \"Plunging Strike\": 332017,\n",
    "  \"Heavy Strike\": 332018,\n",
    "  \"The Legend of Vennessa\": 332019,\n",
    "  \"Friendship Eternal\": 332020,\n",
    "  \"Rhythm of the Great Dream\": 332021,\n",
    "  \"Where Is the Unseen Razor?\": 332022,\n",
    "  \"Pankration!\": 332023,\n",
    "  \"Lyresong\": 332024,\n",
    "  \"Jueyun Guoba\": 333001,\n",
    "  \"Adeptus' Temptation\": 333002,\n",
    "  \"Lotus Flower Crisp\": 333003,\n",
    "  \"Northern Smoked Chicken\": 333004,\n",
    "  \"Sweet Madame\": 333005,\n",
    "  \"Mondstadt Hash Brown\": 333006,\n",
    "  \"Mushroom Pizza\": 333007,\n",
    "  \"Minty Meat Rolls\": 333008,\n",
    "  \"Teyvat Fried Egg\": 333009,\n",
    "  \"Sashimi Platter\": 333010,\n",
    "  \"Tandoori Roast Chicken\": 333011,\n",
    "  \"Butter Crab\": 333012,\n",
    "  \"Unknown\": 999999\n",
    "}\n",
    "'''"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "message = json.loads(message_json)\n",
    "name_id = json.loads(name_id_json)\n",
    "imagepath = json.loads(imagepath_json)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "from typing import Dict, Literal, TypedDict\n",
    "\n",
    "\n",
    "ExpectedLanguageType = Literal['zh-CN', 'en-US']\n",
    "\n",
    "\n",
    "class DescDictType(TypedDict, total = False):\n",
    "    image_path: str\n",
    "    id: int\n",
    "    names: Dict[ExpectedLanguageType, str]\n",
    "    descs: Dict[str, Dict[ExpectedLanguageType, str]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "result: Dict[str, DescDictType] = {}\n",
    "# message\n",
    "for lang in message:\n",
    "    msg = message[lang]\n",
    "    keys = list(msg.keys())\n",
    "    keys.sort()\n",
    "    for key in keys:\n",
    "        key_except_last = '/'.join(key.split('/')[:-1])\n",
    "        if key_except_last in keys:\n",
    "            # valid when except last, is desc\n",
    "            version = key.split('/')[-1]\n",
    "            assert key_except_last in result, key_except_last\n",
    "            if 'descs' not in result[key_except_last]:\n",
    "                result[key_except_last]['descs'] = {}\n",
    "            descs = result[key_except_last]['descs']\n",
    "            if version not in descs:\n",
    "                descs[version] = {}\n",
    "            descs[version][lang] = msg[key]\n",
    "        else:\n",
    "            # name\n",
    "            if key not in result:\n",
    "                result[key] = { 'names': {} }\n",
    "            result[key]['names'][lang] = msg[key]\n",
    "# name_id\n",
    "r_keys = list(result.keys())\n",
    "name_to_r_keys = {}\n",
    "for r_key in r_keys:\n",
    "    key_except_last = '/'.join(r_key.split('/')[:-1])\n",
    "    if key_except_last in result:\n",
    "        # is desc, skip\n",
    "        continue\n",
    "    name = r_key.split('/')[-1]\n",
    "    name_to_r_keys[name] = r_key\n",
    "for n in name_id:\n",
    "    if n == 'Unknown':\n",
    "        continue\n",
    "    nn = name_to_r_keys[n]\n",
    "    result[nn]['id'] = name_id[n]\n",
    "# imagepath\n",
    "for n in imagepath:\n",
    "    if n not in result:\n",
    "        result[n] = {}\n",
    "    result[n]['image_path'] = imagepath[n]\n",
    "json.dump(result, open('result.json', 'w', encoding='utf8'), ensure_ascii=False, indent=2)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "GITCG",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
